-- GENERATED SPELL FOR [Captain Arathyn] --


function spell0_19635(pUnit, Event) --@Summon Azurebeak,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(35882,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_19635', 1, 1)
end

function spell1_19635(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15576,pUnit)
pUnit:RegisterEvent('Sorts_19635', 600, 1)
end

function spell2_19635(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(17207,pUnit)
pUnit:RegisterEvent('Sorts_19635', 2000, 1)
end

function Sorts_19635(pUnit, Event)
local choix_sorts_19635 = math.random(0, 2)
if choix_sorts_19635 == 0 then
pUnit:RegisterEvent('spell0_19635', 1, 1)
end
if choix_sorts_19635 == 1 then
pUnit:RegisterEvent('spell1_19635', 1, 1)
end
if choix_sorts_19635 == 2 then
pUnit:RegisterEvent('spell2_19635', 1, 1)
end
end

function mob19635_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19635', math.random(1500, 3000), 1)
end

function mob19635_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19635_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19635_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19635, 1, 'mob19635_Action')
RegisterUnitEvent(19635, 2, 'mob19635_Leave')
RegisterUnitEvent(19635, 3, 'mob19635_Kill')
RegisterUnitEvent(19635, 4, 'mob19635_Die')
